(global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/phone-login-popup/index" ], {
    "11cd": function(n, e, o) {
        (function(n) {
            var t = o("4ea4").default;
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var c = t(o("a34a")), r = t(o("ded3")), u = t(o("278c")), i = t(o("c973")), a = o("fd0e"), s = o("cee8"), d = o("665c"), l = o("6c67"), p = o("3094"), f = o("48b8"), v = o("8083"), h = {
                setup: function(e, o) {
                    var t = (0, a.reactive)({
                        isShow: !1,
                        popoverVisible: !1,
                        phoneNumber: "",
                        smsCode: "",
                        inputFocus: "",
                        countDownClock: null,
                        countDownSecond: 0,
                        isAgree: !1
                    }), h = (0, a.ref)(null), m = ((0, d.useState)().coupeConfig, (0, a.computed)(function() {
                        return t.countDownSecond ? "".concat(t.countDownSecond, "s") : "获取验证码";
                    })), g = (0, a.computed)(function() {
                        return D() && y() && t.isAgree;
                    }), b = (0, a.computed)(function() {
                        return D() && t.isAgree;
                    }), w = (0, a.computed)(function() {
                        return (0, v.rpx2px)(200);
                    }), x = null, S = {};
                    function k(n) {
                        return $.apply(this, arguments);
                    }
                    function $() {
                        return ($ = (0, i.default)(c.default.mark(function n(e) {
                            return c.default.wrap(function(n) {
                                for (;;) switch (n.prev = n.next) {
                                  case 0:
                                  case "end":
                                    return n.stop();
                                }
                            }, n);
                        }))).apply(this, arguments);
                    }
                    function _() {
                        var n, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "cancel";
                        t.isShow = !1, null === (n = x) || void 0 === n || n({
                            type: e
                        });
                    }
                    function C() {
                        var n;
                        null === (n = h.value) || void 0 === n || n.open();
                    }
                    function D() {
                        return /^1\d{10}$/.test(t.phoneNumber);
                    }
                    function y() {
                        return /^\d{4}$/.test(t.smsCode);
                    }
                    (0, a.onMounted)(function() {});
                    var A = (0, f.throttle)(function() {
                        D() ? t.countDownSecond ? (0, s.$toast)({
                            title: "操作频繁，请".concat(t.countDownSecond, "s再次获取")
                        }) : t.isAgree ? function() {
                            var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
                            return new Promise(function(e, o) {
                                (0, l.sendSmsCode)(n).then(function(n) {
                                    0 === n.ret ? e(n) : o(n);
                                }).catch(function(n) {
                                    o(n), (0, s.$error)({
                                        title: n.msg
                                    });
                                });
                            });
                        }({
                            phone_no: t.phoneNumber
                        }).then(function() {
                            t.inputFocus = "smsCode", t.countDownSecond = 60, t.countDownClock = setInterval(function() {
                                t.countDownSecond > 0 ? t.countDownSecond = t.countDownSecond - 1 : clearInterval(t.countDownClock);
                            }, 1e3);
                        }) : C() : (0, s.$toast)({
                            title: "请输入正确格式的手机号码"
                        });
                    }, 1e3);
                    var N = (0, f.throttle)((0, i.default)(c.default.mark(function e() {
                        var o, r, i, a;
                        return c.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                if (D()) {
                                    e.next = 3;
                                    break;
                                }
                                return (0, s.$toast)({
                                    title: "请输入正确格式的手机号码"
                                }), e.abrupt("return");

                              case 3:
                                if (y()) {
                                    e.next = 6;
                                    break;
                                }
                                return (0, s.$toast)({
                                    title: "请输入正确格式的验证码"
                                }), e.abrupt("return");

                              case 6:
                                if (t.isAgree) {
                                    e.next = 9;
                                    break;
                                }
                                return C(), e.abrupt("return");

                              case 9:
                                return e.next = 11, n.login();

                              case 11:
                                if (o = e.sent, r = (0, u.default)(o, 2), i = r[0], a = r[1].code, !i) {
                                    e.next = 18;
                                    break;
                                }
                                return (0, s.$error)({
                                    title: "发生错误"
                                }), e.abrupt("return");

                              case 18:
                                O({
                                    code: a
                                });

                              case 19:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    })), 1e3);
                    function O() {
                        var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
                        (0, s.$loading)();
                        var e = (0, d.useState)(), o = e.riskInfo, c = o.value, u = c.brand, i = void 0 === u ? "" : u, a = c.model, f = void 0 === a ? "" : a, v = c.os_type, h = void 0 === v ? "" : v, m = c.osversion, g = void 0 === m ? "" : m, b = c.appversion, w = void 0 === b ? "" : b, x = (0, 
                        d.useGetters)(), S = x.startAddress;
                        (0, l.phoneLogin)((0, r.default)((0, r.default)({
                            phone_no: t.phoneNumber,
                            sms_code: t.smsCode,
                            city_id: S.value.city_id
                        }, n), {}, {
                            activity_login_code: 0,
                            login_type: 0,
                            risk_params: JSON.stringify({
                                brand: i,
                                model: f,
                                osversion: g,
                                appversion: w,
                                os: 1 === h ? "android" : 2 === h ? "ios" : ""
                            })
                        })).then(function(n) {
                            s.$loading.hide(), console.info(":: 登录请求返回数据 ::", n), 0 === Number(n.ret) ? ((0, 
                            p.successHandle)(n.data, 2), _("ok")) : (0, s.$toast)({
                                title: n.msg
                            });
                        }).catch(function(n) {
                            s.$loading.hide(), (0, s.$error)({
                                title: n.msg
                            });
                        });
                    }
                    return Object.assign({
                        data: t,
                        tooltipRef: h,
                        countDownText: m,
                        canPhoneLogin: g,
                        canGetSmsCode: b,
                        cursorSpacing: w,
                        hide: _,
                        changeAgree: function() {
                            t.isAgree = !t.isAgree;
                        },
                        getSendSmsCode: A,
                        goLogin: N
                    }, {
                        open: function() {
                            var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : S;
                            return t.inputFocus = "phoneNumber", S = n, new Promise(function(e) {
                                t.isShow = !0, x = e, k(n);
                            });
                        }
                    });
                }
            };
            h.components = Object.assign({
                BottomPopup: function() {
                    Promise.all([ o.e("common/vendor"), o.e("components/bottom-popup/index") ]).then(function() {
                        return resolve(o("54a1"));
                    }.bind(null, o)).catch(o.oe);
                },
                Tooltip: function() {
                    o.e("components/tooltip/index").then(function() {
                        return resolve(o("97ee"));
                    }.bind(null, o)).catch(o.oe);
                },
                HCheckbox: function() {
                    o.e("components/h-checkbox/index").then(function() {
                        return resolve(o("45cc"));
                    }.bind(null, o)).catch(o.oe);
                }
            }, h.components);
            var m = h;
            e.default = m;
        }).call(this, o("543d").default);
    },
    "16f2": function(n, e, o) {
        var t = o("2777");
        o.n(t).a;
    },
    "26d8": function(n, e, o) {
        o.r(e);
        var t = o("11cd"), c = o.n(t);
        for (var r in t) [ "default" ].indexOf(r) < 0 && function(n) {
            o.d(e, n, function() {
                return t[n];
            });
        }(r);
        e.default = c.a;
    },
    2777: function(n, e, o) {},
    d9d5: function(n, e, o) {
        o.d(e, "b", function() {
            return t;
        }), o.d(e, "c", function() {
            return c;
        }), o.d(e, "a", function() {});
        var t = function() {
            this.$createElement;
            this._self._c;
        }, c = [];
    },
    ea12: function(n, e, o) {
        o.r(e);
        var t = o("d9d5"), c = o("26d8");
        for (var r in c) [ "default" ].indexOf(r) < 0 && function(n) {
            o.d(e, n, function() {
                return c[n];
            });
        }(r);
        o("16f2");
        var u = o("f0c5"), i = Object(u.a)(c.default, t.b, t.c, !1, null, "5f0d58ce", null, !1, t.a, void 0);
        e.default = i.exports;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/phone-login-popup/index-create-component", {
    "components/phone-login-popup/index-create-component": function(n, e, o) {
        o("543d").createComponent(o("ea12"));
    }
}, [ [ "components/phone-login-popup/index-create-component" ] ] ]);